import request from '@/router/axios';

export const getList = (current, size, params) => {
    return request({
        url: '/api/mes-product/openingcheck/result/page',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getDetail = (checkResultId) => {
    return request({
        url: '/api/mes-product/openingcheck/result/detail',
        method: 'get',
        params: {
            checkResultId
        }
    });
};

export const getSectionByLineId = (params) => {
    return request({
        url: '/api/mes-product/section/get-by-lineId',
        method: 'get',
        params: params
    });
};

export const getCheckResult = (params) => {
    return request({
        url: '/api/mes-product/openingcheck/result/latest-record',
        method: 'get',
        params: params
    });
};

export const check = (data) => {
    return request({
        url: '/api/mes-product/openingcheck/result/check',
        method: 'post',
        data: data
    });
};

export const submit = (data) => {
    return request({
        url: '/api/mes-product/openingcheck/result/submit',
        method: 'post',
        data: data
    });
};